﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true" Inherits="Admin_admin_cms" ValidateRequest="false" Codebehind="admin-cms.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  <script type="text/javascript" src="../Scripts/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="../Scripts/ckeditor/adapters/jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#ckeditor').ckeditor();
            $('#ckeditor').val($("#<%= hidCKEDitorValue.ClientID %>").val());
        });
        function GetCKEditorData() {
            var data = $('#ckeditor').val();

            if (data != "") {
                $("#<%= hidCKEDitorValue.ClientID %>").val(data);
                return true;
            }
            else {
                alert("Empty is not allowed.");
                return false;
            }

        }
        function ResetFields() {
            $('#ckeditor').val() = '';
        }
    </script>

     <section id="divMessage" runat="server" visible="false">
        <asp:Literal ID="lblMessage" runat="server"></asp:Literal>
       
    </section>
    <span class="title-regular margin-bottom-single">
    <label>Title: </label>
    <asp:Label ID="lblCmsTitle" runat="server" Text="Label"></asp:Label>
    </span>
    <br class="clear" />
    <textarea name="editor1" id="ckeditor">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
    <br class="clear" />
    <section class="btn-place-holder">
      <asp:Button ID="imgSaveBottom" runat="server" AlternateText=" " CssClass="button small blue"
            Text="Save" OnClientClick="javascript:return GetCKEditorData();" OnClick="imgSaveBottom_Click" />
        <asp:Button ID="imbReset" runat="server" CausesValidation="false" OnClientClick="javascript:ResetFields();return false;"
           CssClass="button small gray" Text="Reset" />
      
    </section>
    <br class="clear" />
    <br class="clear" />
    <input id="hidCKEDitorValue" type="hidden" runat="server" />
</asp:Content>
